/**
 * 
 */

package com.chengyu.eyc.enums;

import com.chengyu.eyc.base.AbstractEnums;

import cn.hutool.core.util.StrUtil;

/**
 * @author kevin
 *
 */
public enum OrderStatusEnum implements AbstractEnums<String> {

    SUBMITED("SUBMITED", "已提交"), 
    CONFIRM("CONFIRM",  "已确认"),
    COMPLETED("COMPLETED", "已完成"), 
    REJECT("REJECT", "审核拒绝"),
    CANCEL("CANCEL", "已取消"),
    CANCEL_AUDIT("CANCEL_AUDIT", "取消审核中");

    public static String getOrderStatusNme(String orderStatus) {
        for (OrderStatusEnum orderStatusEnum : OrderStatusEnum.values()) {
            if(StrUtil.equals(orderStatusEnum.getCode(), orderStatus)) {
                return orderStatusEnum.getName();
            }
        }
        return null;
    }

    private String code;

    private String name;

    OrderStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    

}
